220
|
How can I remove all the columns

With AxComboBox1
.Columns.Clear()
End With
|
219
|
How can I remove a column

With AxComboBox1
.Columns.Remove("A")
End With
|
482
|
How can I put icons/images into buttons

With AxComboBox1
.BeginUpdate()
.SingleEdit = True
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
.Columns.Add("")
With .Columns.Add("C+B")
.AllowSizing = False
.Width = 48
.FormatColumn = "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellHasCheckBox) = True
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellHasButton) = True
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellButtonAutoWidth) = True
.Position = 0
End With
.DrawGridLines = EXCOMBOBOXLib.GridLinesEnum.exVLines
.DefaultItemHeight = 20
With .Items
.AddItem("Item 1")
.AddItem("Item 2")
.AddItem("Item 3")
.AddItem("Item 4")
.AddItem("Item 5")
.AddItem("Item 6")
.AddItem("Item 7")
.AddItem("Item 8")
End With
.EndUpdate()
End With
|
205
|
How can I programmatically filter a column

With AxComboBox1
With .Columns.Add("Filter")
.DisplayFilterButton = True
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exNonBlanks
End With
.Items.AddItem()
.Items.AddItem("not empty")
.ApplyFilter()
End With
|
503
|
How can I programmatically clear the control's filter
' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub AxComboBox1_ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxComboBox1.ClickEvent
With AxComboBox1
.ClearFilter()
End With
End Sub
With AxComboBox1
.BeginUpdate()
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible
.FilterBarPromptPattern = "B"
.EndUpdate()
End With
|
91
|
How can I programmatically change the column where incremental searching is performed

With AxComboBox1
.Columns.Add("Column 1")
.Columns.Add("Column 2")
With .Items
.CellCaption(.AddItem("Item 1"),1) = "SubItem 1"
End With
.SearchColumnIndex = 1
End With
|
488
|
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

Dim h
With AxComboBox1
.BeginUpdate()
.LinesAtRoot = EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot
.TreeColumnIndex = -1
.FilterInclude = EXCOMBOBOXLib.FilterIncludeEnum.exMatchingItemsOnly
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "C1|C2"
End With
With .Items
h = .AddItem("R1")
.InsertItem(h,Nothing,"C1")
.InsertItem(h,Nothing,"C2")
.ExpandItem(h) = True
h = .AddItem("R2")
.InsertItem(h,Nothing,"C1")
.InsertItem(h,Nothing,"C2")
End With
.ApplyFilter()
.EndUpdate()
End With
|
315
|
How can I merge cells

Dim h
With AxComboBox1
.MarkSearchColumn = False
.TreeColumnIndex = -1
.Columns.Add("C1")
.Columns.Add("C2")
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
.CellSingleLine(h,1) = EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap
h = .AddItem("This is bit of text merges all cells in the item")
.ItemDivider(h) = 0
.CellHAlignment(h,0) = EXCOMBOBOXLib.AlignmentEnum.CenterAlignment
End With
End With
|
316
|
How can I merge cells

Dim h
With AxComboBox1
.DrawGridLines = EXCOMBOBOXLib.GridLinesEnum.exAllLines
.MarkSearchColumn = False
.Columns.Add("C1")
.Columns.Add("C2")
.Columns.Add("C3")
With .Items
h = .AddItem("this cell merges the first two columns")
.CellMerge(h,0) = 1
h = .AddItem()
.CellCaption(h,1) = "this cell merges the last two columns"
.CellMerge(h,1) = 2
h = .AddItem("this cell merges the all three columns")
.CellMerge(h,0) = 1
.CellMerge(h,0) = 2
h = .AddItem("this draws a divider item")
.ItemDivider(h) = 0
End With
End With
|
364
|
How can I mark the cells that has a specified type, ie strings only

Dim h
With AxComboBox1
.ConditionalFormats.Add("type(%0) = 8").ForeColor = RGB(255,0,0)
.Columns.Add("")
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,2)
.InsertItem(h,Nothing,"Chld 3")
.ExpandItem(h) = True
End With
End With
|
467
|
How can I make bigger/enlarge the control's drop down button

With AxComboBox1
.BeginUpdate()
.LabelHeight = 40
.ScrollWidth = 40
.EndUpdate()
End With
|
254
|
How can I make an item unselectable, or not selectable

Dim h
With AxComboBox1
.Columns.Add("Column")
With .Items
h = .AddItem("unselectable - you can't get selected")
.SelectableItem(h) = False
.AddItem("selectable")
End With
End With
|
7
|
How can I insert an icon to column's header

With AxComboBox1
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
.Columns.Add("ColumnName").HTMLCaption = "<b>HTML</b> Column <img>1</img> Icon"
End With
|
6
|
How can I insert an icon to column's header

With AxComboBox1
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
.Columns.Add("ColumnName").HeaderImage = 1
End With
|
295
|
How can I insert a hyperlink or an anchor element

With AxComboBox1
.Columns.Add("Column")
With .Items
.CellCaptionFormat(.AddItem("Just an <a1>anchor</a> element ..."),0) = EXCOMBOBOXLib.CaptionFormatEnum.exHTML
End With
With .Items
.CellCaptionFormat(.AddItem("Just another <a2>anchor</a> element ..."),0) = EXCOMBOBOXLib.CaptionFormatEnum.exHTML
End With
End With
|
360
|
How can I highlight the cells or items that starts with a specified string

Dim h
With AxComboBox1
.ConditionalFormats.Add("%0 startwith 'C'").Underline = True
.Columns.Add("")
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.InsertItem(h,Nothing,"SChild 3")
.ExpandItem(h) = True
End With
End With
|
421
|
How can I highlight only parts of the cells

Dim h
With AxComboBox1
With .Columns.Add("")
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"
End With
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.InsertItem(h,Nothing,"Child 3")
.ExpandItem(h) = True
End With
End With
|
11
|
How can I hide the searching column

With AxComboBox1
.MarkSearchColumn = False
.Columns.Add("Column 1")
.Columns.Add("Column 2")
.Items.AddItem()
End With
|
126
|
How can I hide the locked / fixed items

With AxComboBox1
.ShowLockedItems = False
.Columns.Add("Column")
With .Items
.LockedItemCount(EXCOMBOBOXLib.VAlignmentEnum.exTop) = 1
.CellCaption(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exTop,0),0) = "locked item"
.AddItem("un-locked item")
End With
End With
|
342
|
How can I hide the drop down buttons when the control loses the focus

Dim h
With AxComboBox1
.HideDropDownButton = True
.IntegralHeight = True
.LinesAtRoot = EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot
.TreeColumnIndex = 1
.Columns.Add("Column 1")
.Columns.Add("Column 2")
With .Items
h = .AddItem("Root 1.1")
.CellCaption(h,1) = "Root 1.2"
.CellCaption(.InsertItem(h,Nothing,"Child 1.1"),1) = "Child 1.2"
.CellCaption(.InsertItem(h,Nothing,"Child 2.1"),1) = "Child 2.2"
.ExpandItem(h) = True
h = .AddItem("Root 2.1")
.CellCaption(h,1) = "Root 2.2"
.CellCaption(.InsertItem(h,Nothing,"Child 1.1"),1) = "Child 1.2"
End With
End With
|
253
|
How can I hide or show an item

Dim h
With AxComboBox1
.Columns.Add("Column")
With .Items
h = .AddItem("hidden")
.ItemHeight(h) = 0
.SelectableItem(h) = False
.AddItem("visible")
End With
End With
|
120
|
How can I hide a column

With AxComboBox1
.Columns.Add("Hidden").Visible = False
.Columns.Add("2")
.Columns.Add("3")
.Columns.Add("4")
.Columns.Add("5")
End With
|
461
|
How can I have a case-sensitive filter

With AxComboBox1
.BeginUpdate()
.MarkSearchColumn = False
With .Columns
With .Add("Car")
.DisplayFilterButton = True
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilterDoCaseSensitive Or EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "Mazda"
End With
With .Add("Equipment")
.DisplayFilterButton = True
.DisplayFilterPattern = False
.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilterDoCaseSensitive Or EXCOMBOBOXLib.FilterTypeEnum.exPattern
.Filter = "Air Bag"
End With
End With
With .Items
.CellCaption(.AddItem("Mazda"),1) = "Air Bag"
.CellCaption(.AddItem("Toyota"),1) = "Air Bag,Air condition"
.CellCaption(.AddItem("Ford"),1) = "Air condition"
.CellCaption(.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "ABS,ESP"
End With
.ApplyFilter()
.EndUpdate()
End With
|
462
|
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

With AxComboBox1
.BeginUpdate()
.MarkSearchColumn = False
With .Columns
With .Add("Car")
.DisplayFilterButton = True
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "MAZDA"
End With
With .Add("Equipment")
.DisplayFilterButton = True
.DisplayFilterPattern = False
.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exPattern
.Filter = "AIR BAG"
End With
End With
With .Items
.CellCaption(.AddItem("Mazda"),1) = "Air Bag"
.CellCaption(.AddItem("Toyota"),1) = "Air Bag,Air condition"
.CellCaption(.AddItem("Ford"),1) = "Air condition"
.CellCaption(.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "ABS,ESP"
End With
.ApplyFilter()
.EndUpdate()
End With
|
29
|
How can I get underlined only a portion of column's header

With AxComboBox1
.Columns.Add("Column 1").HTMLCaption = "<u>Col</u>umn 1"
End With
|
218
|
How can I get the number or the count of columns
Dim var_Count
With AxComboBox1
var_Count = .Columns.Count
End With
|
519
|
How can I get the number of results/items being shown in the control's filter bar (sample 4)

With AxComboBox1
.BeginUpdate()
With .Columns.Add("Item")
.DisplayFilterButton = True
.FilterList = EXCOMBOBOXLib.FilterListEnum.exShowExclude Or EXCOMBOBOXLib.FilterListEnum.exShowFocusItem Or EXCOMBOBOXLib.FilterListEnum.exShowCheckBox Or EXCOMBOBOXLib.FilterListEnum.exSortItemsAsc
End With
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarFont = .Font
.FilterBarPrompt = .FormatABC("`<b>` + value",.FilterBarPrompt)
.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount " & _
"+ 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCompact Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarShowCloseOnRight Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarShowCloseIfRequired Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCaptionVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible
.EndUpdate()
End With
|
518
|
How can I get the number of results being shown in the control's filter bar (sample 3)

With AxComboBox1
.BeginUpdate()
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarFont = .Font
.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount " & _
"+ 1) + ` result(s)` ) : ``)"
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCompact Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCaptionVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "Item A|Item B"
End With
.ApplyFilter()
.EndUpdate()
End With
|
517
|
How can I get the number of results being shown in the control's filter bar (sample 2, compact)

With AxComboBox1
.BeginUpdate()
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarFont = .Font
.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? `<off -4> ` + abs(matchitemcount + 1) + ` result(s)` : ``)"
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCompact Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarSingleLine Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCaptionVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "Item A|Item B"
End With
.ApplyFilter()
.EndUpdate()
End With
|
516
|
How can I get the number of results being shown in the control's filter bar (sample 1)

With AxComboBox1
.BeginUpdate()
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarFont = .Font
.FilterBarCaption = "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCaptionVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "Item A|Item B"
End With
.ApplyFilter()
.EndUpdate()
End With
|
504
|
How can I get the number of results after a filter is applied

' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub AxComboBox1_ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxComboBox1.ClickEvent
With AxComboBox1
.ClearFilter()
End With
End Sub
' FilterChange event - Occurs when filter was changed.
Private Sub AxComboBox1_FilterChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxComboBox1.FilterChange
With AxComboBox1
Debug.Print( "Items.MatchItemCount" )
Debug.Print( .Items.MatchItemCount )
Debug.Print( .FormatABC("value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",.Items.MatchItemCount) )
End With
End Sub
With AxComboBox1
.BeginUpdate()
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible
.FilterBarPromptPattern = "Item"
.EndUpdate()
End With
|
420
|
How can I get the number of occurrences of a specified string in the cell

Dim h
With AxComboBox1
.Columns.Add("")
With .Columns.Add("occurrences")
.ComputedField = "lower(%0) count 'o'"
.FormatColumn = "'contains ' + value + ' of \'o\' chars'"
End With
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1 oooof the root")
.InsertItem(h,Nothing,"Child 2")
.InsertItem(h,Nothing,"Child 3")
.ExpandItem(h) = True
End With
End With
|
399
|
How can I get the number of occurrences of a specified string in the cell

Dim h
With AxComboBox1
.Columns.Add("")
With .Columns.Add("occurrences")
.ComputedField = "lower(%0) count 'o'"
.FormatColumn = "'contains ' + value + ' of \'o\' chars'"
End With
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1 oooof the root")
.InsertItem(h,Nothing,"Child 2")
.InsertItem(h,Nothing,"Child 3")
.ExpandItem(h) = True
End With
End With
|
277
|
How can I get the handle of an item based on the handle of the cell

Dim h
With AxComboBox1
.Columns.Add("Default")
With .Items
h = .AddItem("Root 1")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.ExpandItem(h) = True
.ItemBold(.CellItem(.ItemCell(h,0))) = True
End With
End With
|
222
|
How can I get the columns as they are shown in the control's sortbar
Dim var_Object
With AxComboBox1
var_Object = .Columns.ItemBySortPosition(0)
End With
|
386
|
How can I get second part of the date

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("Second").ComputedField = "sec(date(%0))"
With .Items
.AddItem(#1/11/2001 10:10:00 AM#)
.AddItem(#2/22/2002 11:01:22 AM#)
.AddItem(#3/13/2003 0:23:01 PM#)
.AddItem(#4/14/2004 1:11:59 PM#)
End With
End With
|
65
|
How can I get ride/hide of the "Filter For" field

With AxComboBox1
With .Columns.Add("Column")
.DisplayFilterButton = True
.DisplayFilterPattern = False
End With
End With
|
368
|
How can I get or display the integer part of the cell

With AxComboBox1
.Columns.Add("Number")
.Columns.Add("Int").ComputedField = "int(%0)"
With .Items
.AddItem("-1.98")
.AddItem("0.99")
.AddItem("1.23")
.AddItem("2.34")
End With
End With
|
379
|
How can I get only the year part from a date expression

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("Year").ComputedField = "year(%0)"
With .Items
.AddItem(#1/1/2001 10:00:00 AM#)
.AddItem(#2/2/2002 11:00:00 AM#)
.AddItem(#3/3/2003 0:00:00 PM#)
.AddItem(#4/4/2004 1:00:00 PM#)
End With
End With
|
385
|
How can I get minute part of the date

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("Minute").ComputedField = "min(date(%0))"
With .Items
.AddItem(#1/11/2001 10:10:00 AM#)
.AddItem(#2/22/2002 11:01:00 AM#)
.AddItem(#3/13/2003 0:23:00 PM#)
.AddItem(#4/14/2004 1:11:00 PM#)
End With
End With
|
309
|
How can I fix or lock items

With AxComboBox1
.Columns.Add("Default")
With .Items
.LockedItemCount(EXCOMBOBOXLib.VAlignmentEnum.exTop) = 1
.CellCaption(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exTop,0),0) = "This is a locked item, fixed to the top side of the control."
.ItemBackColor(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exTop,0)) = RGB(196,196,186)
.LockedItemCount(EXCOMBOBOXLib.VAlignmentEnum.exBottom) = 2
.CellCaption(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exBottom,0),0) = "This is a locked item, fixed to the top side of the control."
.ItemBackColor(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exBottom,0)) = RGB(196,196,186)
.CellCaption(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exBottom,1),0) = "This is a locked item, fixed to the top side of the control."
.ItemBackColor(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exBottom,1)) = RGB(186,186,186)
End With
End With
|
307
|
How can I fix or lock an item on the top of the control

Dim h
With AxComboBox1
.Columns.Add("Default")
With .Items
.LockedItemCount(EXCOMBOBOXLib.VAlignmentEnum.exTop) = 1
.CellCaption(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exTop,0),0) = "This is a locked item, fixed to the top side of the control."
h = .AddItem("Root 1")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.ExpandItem(h) = True
End With
End With
|
308
|
How can I fix or lock an item on the bottom side of the control

Dim h
With AxComboBox1
.Columns.Add("Default")
With .Items
.LockedItemCount(EXCOMBOBOXLib.VAlignmentEnum.exBottom) = 1
.CellCaption(.LockedItem(EXCOMBOBOXLib.VAlignmentEnum.exBottom,0),0) = "This is a locked item, fixed to the bottom side of the control."
h = .AddItem("Root 1")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.ExpandItem(h) = True
End With
End With
|
292
|
How can I find the cell being clicked in a radio group

Dim h
With AxComboBox1
.MarkSearchColumn = False
.SelBackColor = RGB(255,255,128)
.SelForeColor = RGB(0,0,0)
.Columns.Add("C1")
.Columns.Add("C2")
.Columns.Add("C3")
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "Radio 1"
.CellHasRadioButton(h,1) = True
.CellRadioGroup(h,1) = 1234
.CellCaption(h,2) = "Radio 2"
.CellHasRadioButton(h,2) = True
.CellRadioGroup(h,2) = 1234
.CellState(h,1) = 1
.CellBold(Nothing,.CellChecked(1234)) = True
End With
End With
|
489
|
How can I find if there is any filter applied to the control

' FilterChange event - Occurs when filter was changed.
Private Sub AxComboBox1_FilterChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxComboBox1.FilterChange
With AxComboBox1
Debug.Print( "If negative, the filter is present, else not" )
Debug.Print( .Items.VisibleItemCount )
End With
End Sub
Dim h
With AxComboBox1
.BeginUpdate()
.LinesAtRoot = EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot
.TreeColumnIndex = -1
.FilterInclude = EXCOMBOBOXLib.FilterIncludeEnum.exMatchingItemsOnly
With .Columns.Add("Column")
.DisplayFilterButton = True
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "C1"
End With
With .Items
h = .AddItem("R1")
.InsertItem(h,Nothing,"C1")
.InsertItem(h,Nothing,"C2")
.ExpandItem(h) = True
h = .AddItem("R2")
.InsertItem(h,Nothing,"C1")
.InsertItem(h,Nothing,"C2")
End With
.ApplyFilter()
.EndUpdate()
End With
|
497
|
How can I find if the control is running in DPI mode
With AxComboBox1
Debug.Print( .FormatABC("dpi = 1 ? `normal/stretch mode` : `dpi mode`") )
End With
|
44
|
How can I filter the items that are between an interval/range of dates

With AxComboBox1
With .Columns.Add("Column")
.DisplayFilterButton = True
.DisplayFilterDate = True
End With
.ApplyFilter()
End With
|
412
|
How can I filter programatically using more columns

With AxComboBox1
.BeginUpdate()
.MarkSearchColumn = False
With .Columns
.Add("Car")
.Add("Equipment")
End With
With .Items
.CellCaption(.AddItem("Mazda"),1) = "Air Bag"
.CellCaption(.AddItem("Toyota"),1) = "Air Bag,Air condition"
.CellCaption(.AddItem("Ford"),1) = "Air condition"
.CellCaption(.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
.CellCaption(.AddItem("Mazda"),1) = "ABS,ESP"
End With
With .Columns.Item("Car")
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "Mazda"
End With
With .Columns.Item("Equipment")
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exPattern
.Filter = "*ABS*|*ESP*"
End With
.ApplyFilter()
.EndUpdate()
End With
|
426
|
How can I expand all items

Dim h
With AxComboBox1
.BeginUpdate()
.LinesAtRoot = EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot
.Columns.Add("Items")
With .Items
h = .AddItem("Root 1")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
h = .AddItem("Root 2")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.ExpandItem(0) = True
End With
.EndUpdate()
End With
|
341
|
How can I ensure that the drop down portions doesn't show partial items

Dim h
With AxComboBox1
.IntegralHeight = True
.LinesAtRoot = EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot
.TreeColumnIndex = 1
.Columns.Add("Column 1")
.Columns.Add("Column 2")
With .Items
h = .AddItem("Root 1.1")
.CellCaption(h,1) = "Root 1.2"
.CellCaption(.InsertItem(h,Nothing,"Child 1.1"),1) = "Child 1.2"
.CellCaption(.InsertItem(h,Nothing,"Child 2.1"),1) = "Child 2.2"
.ExpandItem(h) = True
h = .AddItem("Root 2.1")
.CellCaption(h,1) = "Root 2.2"
.CellCaption(.InsertItem(h,Nothing,"Child 1.1"),1) = "Child 1.2"
End With
End With
|
580
|
How can I enable the clear-button (visible only if required)

With AxComboBox1
.BeginUpdate()
.Style = EXCOMBOBOXLib.StyleEnum.DropDownList
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = 1
.Columns.Add("Column")
With .Items
.AddItem("Zero")
.AddItem("One")
.AddItem("Two")
End With
.set_Select(0,"Zero")
.EndUpdate()
End With
|
584
|
How can I enable the clear-button (visible only if required and focused)
With AxComboBox1
.BeginUpdate()
.Style = EXCOMBOBOXLib.StyleEnum.DropDownList
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = 3
.Columns.Add("Column")
With .Items
.AddItem("Zero")
.AddItem("One")
.AddItem("Two")
End With
.set_Select(0,"Zero")
.EndUpdate()
End With
|
583
|
How can I enable the clear-button (visible only if focused)
With AxComboBox1
.BeginUpdate()
.Style = EXCOMBOBOXLib.StyleEnum.DropDownList
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = 2
.Columns.Add("Column")
With .Items
.AddItem("Zero")
.AddItem("One")
.AddItem("Two")
End With
.set_Select(0,"Zero")
.EndUpdate()
End With
|
581
|
How can I enable the clear-button (always visible)

With AxComboBox1
.BeginUpdate()
.Style = EXCOMBOBOXLib.StyleEnum.DropDownList
.HeaderVisible = False
.IntegralHeight = True
.ShowClearButton = -1
.Columns.Add("Column")
With .Items
.AddItem("Zero")
.AddItem("One")
.AddItem("Two")
End With
.set_Select(0,"Zero")
.EndUpdate()
End With
|
18
|
How can I draw grid lines only for visible items

With AxComboBox1
.MarkSearchColumn = False
.DrawGridLines = EXCOMBOBOXLib.GridLinesEnum.exRowLines
.Columns.Add("Column 1")
.Columns.Add("Column 2")
.Items.AddItem(0)
.Items.AddItem(1)
.Items.AddItem(2)
End With
|
554
|
How can I display UNICODE characters

With AxComboBox1
.BeginUpdate()
With .Font
.Name = "Arial Unicode"
.Size = 22
End With
.HeaderVisible = False
.DefaultItemHeight = 48
.Columns.Add("").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
With .Items
.AddItem("Ӓӓ")
.AddItem("ᦜᦝ;ᦞ")
.AddItem("ɮɭ;ɯ")
.AddItem("勳勴勵勶")
.FormatCell(.AddItem(AxComboBox1.Version),0) = "(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` "
End With
.EndUpdate()
End With
|
415
|
How can I display true or false instead 0 and -1

With AxComboBox1
.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'"
With .Items
.AddItem(True)
.AddItem(False)
.AddItem(True)
.AddItem(0)
.AddItem(1)
End With
End With
|
393
|
How can I display true or false instead 0 and -1

With AxComboBox1
.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'"
With .Items
.AddItem(True)
.AddItem(False)
.AddItem(True)
.AddItem(0)
.AddItem(1)
End With
End With
|
374
|
How can I display the time only of a date expression

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("Time").ComputedField = "'time is:' + time(date(%0))"
With .Items
.AddItem(#1/1/2001 10:00:00 AM#)
.AddItem(#2/2/2002 11:00:00 AM#)
.AddItem(#3/3/2003 0:00:00 PM#)
.AddItem(#4/4/2004 1:00:00 PM#)
End With
End With
|
387
|
How can I display the number of days between two dates

Dim h
With AxComboBox1
.Columns.Add("Start")
.Columns.Add("End")
.Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'"
With .Items
h = .AddItem(#1/11/2001#)
.CellCaption(h,1) = #1/14/2001#
h = .AddItem(#2/22/2002#)
.CellCaption(h,1) = #3/14/2002#
h = .AddItem(#3/13/2003#)
.CellCaption(h,1) = #4/11/2003#
End With
End With
|
390
|
How can I display the currency only for not empty cells

With AxComboBox1
.Columns.Add("Number")
.Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''"
With .Items
.AddItem("1.23")
.AddItem("2.34")
.AddItem("0")
.ItemBackColor(.AddItem()) = RGB(255,128,128)
.AddItem("10000.99")
End With
End With
|
505
|
How can I display the control's filter on a single line (prompt-combined)

With AxComboBox1
.BeginUpdate()
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarCaption = "`<r>` + value"
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCompact Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarSingleLine Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarVisible Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible
With .Columns.Item(0)
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "Item A|Item B"
End With
.ApplyFilter()
.EndUpdate()
End With
|
506
|
How can I display the control's filter on a single line

With AxComboBox1
.BeginUpdate()
.Columns.Add("Item").DisplayFilterButton = True
With .Columns.Add("Pos")
.AllowSizing = False
.AllowSort = False
.Width = 32
.FormatColumn = "1 apos ``"
.Position = 0
End With
With .Items
.AddItem("Item A")
.AddItem("Item B")
.AddItem("Item C")
End With
.FilterBarCaption = "len(value) ? `filter for: <fgcolor 808080>` + value : `<fgcolor 808080>no filter`"
.FilterBarPromptVisible = EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarSingleLine Or EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarVisible
With .Columns.Item(0)
.FilterType = EXCOMBOBOXLib.FilterTypeEnum.exFilter
.Filter = "Item A|Item B"
End With
.ApplyFilter()
.EndUpdate()
End With
|
400
|
How can I display the column using currency format and enlarge the font for certain values

With AxComboBox1
With .Columns.Add("Currency")
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
End With
With .Items
.AddItem("1.23")
.AddItem("2.34")
.AddItem("9.94")
.AddItem("11.94")
.AddItem("1000")
End With
End With
|
422
|
How can I display the column using currency format and enlarge the font for certain values

With AxComboBox1
With .Columns.Add("Currency")
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
End With
With .Items
.AddItem("1.23")
.AddItem("2.34")
.AddItem("9.94")
.AddItem("11.94")
.AddItem("1000")
End With
End With
|
391
|
How can I display the column using currency

With AxComboBox1
.Columns.Add("Currency").FormatColumn = "currency(dbl(value))"
With .Items
.AddItem("1.23")
.AddItem("2.34")
.AddItem("0")
.AddItem(5)
.AddItem("10000.99")
End With
End With
|
413
|
How can I display the column using currency

With AxComboBox1
.Columns.Add("Currency").FormatColumn = "currency(dbl(value))"
With .Items
.AddItem("1.23")
.AddItem("2.34")
.AddItem("0")
.AddItem(5)
.AddItem("10000.99")
End With
End With
|
356
|
How can I display the column's header using multiple lines

With AxComboBox1
.HeaderHeight = 128
.HeaderSingleLine = False
.Columns.Add("This is just a column that should break the header.").Width = 32
.Columns.Add("This is just another column that should break the header.")
End With
|
56
|
How can I display the column's filter

With AxComboBox1
.Columns.Add("").DisplayFilterButton = True
End With
|
416
|
How can I display only the right part of the cell

Dim h
With AxComboBox1
.Columns.Add("")
With .Columns.Add("Right")
.ComputedField = "%0 right 2"
.FormatColumn = "'""' + value + '""'"
End With
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.InsertItem(h,Nothing,"SChild 3")
.ExpandItem(h) = True
End With
End With
|
395
|
How can I display only the right part of the cell

Dim h
With AxComboBox1
.Columns.Add("")
With .Columns.Add("Right")
.ComputedField = "%0 right 2"
.FormatColumn = "'""' + value + '""'"
End With
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.InsertItem(h,Nothing,"SChild 3")
.ExpandItem(h) = True
End With
End With
|
380
|
How can I display only the month of the date

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("Month").ComputedField = "month(%0)"
With .Items
.AddItem(#1/1/2001 10:00:00 AM#)
.AddItem(#2/2/2002 11:00:00 AM#)
.AddItem(#3/3/2003 0:00:00 PM#)
.AddItem(#4/4/2004 1:00:00 PM#)
End With
End With
|
394
|
How can I display only the left part of the cell

Dim h
With AxComboBox1
.Columns.Add("")
.Columns.Add("Left").ComputedField = "%0 left 2"
With .Items
h = .AddItem("Root")
.InsertItem(h,Nothing,"Child 1")
.InsertItem(h,Nothing,"Child 2")
.InsertItem(h,Nothing,"SChild 3")
.ExpandItem(h) = True
End With
End With
|
381
|
How can I display only the day of the date

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("Day").ComputedField = "day(%0)"
With .Items
.AddItem(#1/11/2001 10:00:00 AM#)
.AddItem(#2/22/2002 11:00:00 AM#)
.AddItem(#3/13/2003 0:00:00 PM#)
.AddItem(#4/14/2004 1:00:00 PM#)
End With
End With
|
439
|
How can I display numbers with 2 digits in each group

Dim h
With AxComboBox1
.BeginUpdate()
.Columns.Add("Def").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
With .Items
h = .AddItem(100000.27)
.FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'"
h = .AddItem(100000.27)
.FormatCell(h,0) = "(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'"
End With
.EndUpdate()
End With
|
367
|
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

Dim h
With AxComboBox1
.Columns.Add("").ComputedField = "proper(%0)"
With .Items
h = .AddItem("root")
.InsertItem(h,Nothing,"child child")
.InsertItem(h,Nothing,"child child")
.InsertItem(h,Nothing,"child child")
.ExpandItem(h) = True
End With
End With
|
168
|
How can I display my text on the scroll bar, using a different font

With AxComboBox1
.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exThumbPart,"This is <s><font Tahoma;12> just </font></s> text")
.ColumnAutoResize = False
.ScrollHeight = 20
.Columns.Add("C1").Width = 256
.Columns.Add("C2").Width = 256
.Columns.Add("C3").Width = 256
End With
|
167
|
How can I display my text on the scroll bar, using a different font

With AxComboBox1
.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exThumbPart,"This is just a text")
.get_ScrollFont(EXCOMBOBOXLib.ScrollBarEnum.exHScroll).Size = 12
.ColumnAutoResize = False
.ScrollHeight = 20
.Columns.Add("C1").Width = 256
.Columns.Add("C2").Width = 256
.Columns.Add("C3").Width = 256
End With
|
166
|
How can I display my text on the scroll bar

With AxComboBox1
.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exHScroll,EXCOMBOBOXLib.ScrollPartEnum.exThumbPart,"this is just a text")
.ColumnAutoResize = False
.Columns.Add("C1").Width = 256
.Columns.Add("C2").Width = 256
.Columns.Add("C3").Width = 256
End With
|
438
|
How can I display my numbers using a different decimal separator

Dim h
With AxComboBox1
.BeginUpdate()
.Columns.Add("Def").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
With .Items
h = .AddItem(100.27)
.FormatCell(h,0) = "(value format '') + ' <fgcolor=808080>(default)'"
h = .AddItem(100.27)
.FormatCell(h,0) = "(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'"
End With
.EndUpdate()
End With
|
414
|
How can I display icons or images instead numbers

With AxComboBox1
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
With .Columns.Add("Icons")
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value"
End With
With .Items
.AddItem(1)
.AddItem(2)
.AddItem(3)
End With
End With
|
392
|
How can I display icons or images instead numbers

With AxComboBox1
.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq" & _
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" & _
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" & _
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
With .Columns.Add("Icons")
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value"
End With
With .Items
.AddItem(1)
.AddItem(2)
.AddItem(3)
End With
End With
|
397
|
How can I display dates in short format

With AxComboBox1
.Columns.Add("Date").FormatColumn = "shortdate(value)"
With .Items
.AddItem(#1/1/2001#)
.AddItem(#2/2/2002#)
.AddItem(#3/3/2003#)
.AddItem(#4/4/2004#)
End With
End With
|
375
|
How can I display dates in short format

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("ShortFormat").ComputedField = "shortdate(%0)"
With .Items
.AddItem(#1/1/2001 10:00:00 AM#)
.AddItem(#2/2/2002 11:00:00 AM#)
.AddItem(#3/3/2003 0:00:00 PM#)
.AddItem(#4/4/2004 1:00:00 PM#)
End With
End With
|
418
|
How can I display dates in short format

With AxComboBox1
.Columns.Add("Date").FormatColumn = "shortdate(value)"
With .Items
.AddItem(#1/1/2001#)
.AddItem(#2/2/2002#)
.AddItem(#3/3/2003#)
.AddItem(#4/4/2004#)
End With
End With
|
419
|
How can I display dates in my format

With AxComboBox1
With .Columns.Add("Date")
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
End With
With .Items
.AddItem(#1/21/2001#)
.AddItem(#2/22/2002#)
.AddItem(#3/13/2003#)
.AddItem(#4/24/2004#)
End With
End With
|
398
|
How can I display dates in my format

With AxComboBox1
With .Columns.Add("Date")
.Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
End With
With .Items
.AddItem(#1/21/2001#)
.AddItem(#2/22/2002#)
.AddItem(#3/13/2003#)
.AddItem(#4/24/2004#)
End With
End With
|
417
|
How can I display dates in long format

With AxComboBox1
.Columns.Add("Date").FormatColumn = "longdate(value)"
With .Items
.AddItem(#1/1/2001#)
.AddItem(#2/2/2002#)
.AddItem(#3/3/2003#)
.AddItem(#4/4/2004#)
End With
End With
|
396
|
How can I display dates in long format

With AxComboBox1
.Columns.Add("Date").FormatColumn = "longdate(value)"
With .Items
.AddItem(#1/1/2001#)
.AddItem(#2/2/2002#)
.AddItem(#3/3/2003#)
.AddItem(#4/4/2004#)
End With
End With
|
376
|
How can I display dates in long format

With AxComboBox1
.Columns.Add("Date")
.Columns.Add("LongFormat").ComputedField = "longdate(%0)"
With .Items
.AddItem(#1/1/2001 10:00:00 AM#)
.AddItem(#2/2/2002 11:00:00 AM#)
.AddItem(#3/3/2003 0:00:00 PM#)
.AddItem(#4/4/2004 1:00:00 PM#)
End With
End With
|
271
|
How can I display an item or a cell on multiple lines

Dim h
With AxComboBox1
.ScrollBySingleLine = True
.Columns.Add("C1")
.Columns.Add("C2")
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "This is bit of text that's shown on multiple lines"
.CellSingleLine(h,1) = EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap
End With
End With
|
198
|
How can I display all cells using multiple lines

With AxComboBox1
.Columns.Add("MultipleLine").Def(EXCOMBOBOXLib.DefColumnEnum.exCellSingleLine) = False
.Columns.Add("SingleLine").Def(EXCOMBOBOXLib.DefColumnEnum.exCellSingleLine) = True
With .Items
.CellCaption(.AddItem("This is a bit of long text that should break the line"),1) = "this is a bit of long text that's displayed on a single line"
End With
End With
|
199
|
How can I display all cells using HTML format

With AxComboBox1
.Columns.Add("HTML").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.Items.AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.")
End With
|
190
|
How can I display a tooltip when the cursor hovers the column

With AxComboBox1
.Columns.Add("tooltip").ToolTip = "This is a bit of text that is shown when user hovers the column."
End With
|
159
|
How can I display a multiple pictures to a cell or item

With AxComboBox1
.DefaultItemHeight = 48
.set_HTMLPicture("pic1","c:\exontrol\images\zipdisk.gif")
.set_HTMLPicture("pic2","c:\exontrol\images\auction.gif")
.Columns.Add("C1")
With .Items
.CellCaptionFormat(.AddItem("<img>pic1</img> Text <img>pic2</img> another text ..."),0) = EXCOMBOBOXLib.CaptionFormatEnum.exHTML
End With
End With
|
406
|
How can I display a filter field in the bottom part of the drop down portion

With AxComboBox1
.BeginUpdate()
.FilterForVisible = True
.IntegralHeight = True
.Columns.Add("Default")
With .Items
.AddItem("Item 1")
.AddItem("Item 2")
.AddItem("Item 3")
.AddItem("Item 4")
.AddItem("Item 5")
End With
.EndUpdate()
End With
|
310
|
How can I display a divider item, merging all cells

Dim h
With AxComboBox1
.MarkSearchColumn = False
.TreeColumnIndex = -1
.Columns.Add("C1")
.Columns.Add("C2")
With .Items
h = .AddItem("Cell 1")
.CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
.CellSingleLine(h,1) = EXCOMBOBOXLib.CellSingleLineEnum.exCaptionWordWrap
h = .AddItem("This is bit of text that's displayed on the entire item, divider.")
.ItemDivider(h) = 0
.CellHAlignment(h,0) = EXCOMBOBOXLib.AlignmentEnum.CenterAlignment
End With
End With
|
485
|
How can I display a different column, on the control's label (method 2)

With AxComboBox1
.BeginUpdate()
.Style = EXCOMBOBOXLib.StyleEnum.DropDownList
.SingleEdit = True
.LabelColumnIndex = 1
.DrawGridLines = EXCOMBOBOXLib.GridLinesEnum.exVLines
.Columns.Add("Column 1").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.Columns.Add("Column 2").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
With .Items
.CellCaption(.AddItem("Item 1 on <b>Column 1"),1) = "Item 1 on <b>Column 2"
.CellCaption(.AddItem("Item 2 on <b>Column 1"),1) = "Item 2 on <b>Column 2"
.CellCaption(.AddItem("Item 3 on <b>Column 1"),1) = "Item 3 on <b>Column 2"
.SelectItem(.FirstVisibleItem) = True
End With
.EndUpdate()
End With
|
484
|
How can I display a different column, on the control's label (method 1)

With AxComboBox1
.BeginUpdate()
.Style = EXCOMBOBOXLib.StyleEnum.DropDownList
.SingleEdit = True
.SearchColumnIndex = 1
.DrawGridLines = EXCOMBOBOXLib.GridLinesEnum.exVLines
.Columns.Add("Column 1").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
.Columns.Add("Column 2").Def(EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat) = 1
With .Items
.CellCaption(.AddItem("Item 1 on <b>Column 1"),1) = "Item 1 on <b>Column 2"
.CellCaption(.AddItem("Item 2 on <b>Column 1"),1) = "Item 2 on <b>Column 2"
.CellCaption(.AddItem("Item 3 on <b>Column 1"),1) = "Item 3 on <b>Column 2"
.SelectItem(.FirstVisibleItem) = True
End With
.EndUpdate()
End With
|
410
|
How can I display a different caption in the label area, when I click the cell's check box

' CellStateChanged event - Fired after cell's state has been changed.
Private Sub AxComboBox1_CellStateChanged(ByVal sender As System.Object, ByVal e As AxEXCOMBOBOXLib._IComboBoxEvents_CellStateChangedEvent) Handles AxComboBox1.CellStateChanged
With AxComboBox1
.LabelText = e.cell
Debug.Print( .Items.CellCaption(0,e.cell) )
Debug.Print( .Items.CellState(0,e.cell) )
End With
End Sub
With AxComboBox1
.BeginUpdate()
.Style = EXCOMBOBOXLib.StyleEnum.DropDownList
.IntegralHeight = True
.HeaderVisible = False
.SingleEdit = True
.SearchColumnIndex = -1
.AdjustSearchColumn = False
.Columns.Add("Language").Def(EXCOMBOBOXLib.DefColumnEnum.exCellHasCheckBox) = True
With .Items
.AddItem("English")
.AddItem("Hebrew")
.AddItem("Spanish")
End With
.LabelText = " <b>custom</b> text "
.EndUpdate()
End With
|